<?php

class Permissao extends DataMapper {

    var $table = 'permissoes';
	
	var $has_many = array("usuarios");

    function __construct($id = NULL)
    {
        parent::__construct($id);
    }
	
	public function consultaPermissao($valor = null){
		//seleciona permissao do banco de dados
		$perm = new Permissao();
		$perm->where('id >=', $valor);
		$perm = $perm->get();
		$permissao = array();
		foreach($perm as $p){
			$permissao[$p->id ] = $p->nome_permissao;
		}
		return $permissao;

	}
	
	
}

/* End of file permissao.php */
/* Location: ./application/models/permissao.php */
